/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi;

import java.util.List;

/**
 *
 * @author nekdo
 */
public interface AircraftServiceLocal {
    /**
     * Store aircraft from parameter to datastore
     * @throws IllegalArgumentException when argument null or argumet ID is null
     * @param aircraft
     */
    void create(Aircraft aircraft);
    
    /**
     * gets Aircraft by its id
     * @param id
     * @throws IllegalArgumentException when argument null or argument ID is null
     * @return Aircraft or NULL when not found
     */
    Aircraft get(Long id);
    
    /**
     * Update specified Aircraft
     * @throws IllegalArgumentException when argument is null or argument ID is null
     * @param specified aircraft
     */
    void update(Aircraft aircraft);
    
    /**
     * Removes specified aircraft
     * @throws IllegalArgumentException when argument is null or argument ID is null
     * @param specified aircraft
     */
    void remove(Aircraft aircraft);
    

    /**
     * Return all aircrafts
     * @return List of all Aircrafts stored in the database
     */
    List<Aircraft> findAll();
    
    /**
     * Return all aircrafts with specified code
     * @throws IllegalArgumentException when argument is null or argument is empty
     * @param code specified code of the aircraft
     * @return List of all Aircrafts with specified code
     */
    Aircraft findByCode(String code);
}
